package com.lujianfei.filesend

import android.app.Application
import androidx.annotation.NonNull
import com.lujianfei.common.BaseApplication
import com.lujianfei.filesend.utils.SpBase
import java.util.UUID
import kotlin.properties.Delegates


/**
 * Author: lujianfei
 * Date: 2023/10/16 14:13
 * Description:
 */

class MyApplication: BaseApplication() {

    companion object {
        var instance by Delegates.notNull<MyApplication>()
    }

    override fun onCreate() {
        super.onCreate()
        instance = this
        initUUID()
    }

    private fun initUUID() {
        if (SpBase.uuid.isBlank()) {
            SpBase.uuid = UUID.randomUUID().toString()
        }
    }
}